<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>带返回值的函数</title>
</head>
<body>
<!--<script>
    function demo() {
        alert("我会执行吗？");
        return "hello";
       // return之后不能有其他语句
    }
    var vl1 = demo()+":iwen";
    var vl2 = demo()+":ime";
    alert(vl1);
    alert(vl2);
</script>-->
<p id="pid"></p>
<script>
    function demo02(a,b) {
        if(a>b){
            return "a比较大";
        }else{
            return "b比较大";
        }
    }
    document.getElementById("pid").innerHTML=demo02(18,10);
</script>

</body>
</html>